/**
 * Copyright 2008-2009. Chongqing Communications Industry Services Co.,Ltd Information Technology Branch. All rights
 * reserved. <a>http://www.cqcis.com</a>
 */
package com.firebird.base.orm.jdbc;

import java.util.List;

import org.springframework.jdbc.core.simple.ParameterizedBeanPropertyRowMapper;
import org.springframework.jdbc.core.simple.ParameterizedRowMapper;

/**
 * @author qiuxj
 * @date 2009-11-14
 */
public class JdbcUtil {
	
	  public static <T> List<T> queryForList(BaseJdbcDao dao, Class<T> clazzTo, String querySql, Object[] params)
	  {
	    return dao.getSimpleJdbcTemplate().query(querySql, (ParameterizedRowMapper)ParameterizedBeanPropertyRowMapper.newInstance(clazzTo), 
	      params);
	  }

}
